#pragma once

namespace Vortex { namespace Wrapper { namespace Direct3D {

	///<summary>Wrapper of D3DXBuffer interface</summary>
	public ref class D3DXBuffer {
		ID3DXBuffer* _handle;

	public:

		///<summary>Direct3DDevice handle</summary>
		property IntPtr Handle { IntPtr get() { return IntPtr(_handle); } }

		property ID3DXBuffer* NativeHandle { ID3DXBuffer* get() { return _handle; } }

		D3DXBuffer(ID3DXBuffer* handle) : _handle(handle) { }

		~D3DXBuffer() { _handle->Release(); }

		IntPtr GetBufferPointer() {
			return IntPtr(_handle->GetBufferPointer());
		}

		DWORD GetBufferSize() {
			return _handle->GetBufferSize();
		}

	};
}}}